package com.ubs.training.server.dao.model;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * Created with IntelliJ IDEA.
 * User: xubuntu
 * Date: 8/21/12
 * Time: 4:52 AM
 * To change this template use File | Settings | File Templates.
 */
@GenericGenerator(name = "CMSTR_SEQ", strategy = "sequence",
        parameters = {@Parameter(name="sequence", value="cmstr_seq")})
@Entity(name="ratingagency")
public class RatingAgency {

    @GeneratedValue(generator = "CMSTR_SEQ")
    @Id
    private  int RatingAgencyID ;

    private String RatingAgencyName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RatingAgency that = (RatingAgency) o;

        if (RatingAgencyID != that.RatingAgencyID) return false;
        if (RatingAgencyName != null ? !RatingAgencyName.equals(that.RatingAgencyName) : that.RatingAgencyName != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = RatingAgencyID;
        result = 31 * result + (RatingAgencyName != null ? RatingAgencyName.hashCode() : 0);
        return result;
    }



    public String getRatingAgencyName() {
        return RatingAgencyName;
    }

    public void setRatingAgencyName(String ratingAgencyName) {
        RatingAgencyName = ratingAgencyName;
    }

    public int getRatingAgencyID() {

        return RatingAgencyID;
    }

    public void setRatingAgencyID(int ratingAgencyID) {
        RatingAgencyID = ratingAgencyID;
    }


}
